#ifndef MAINCONTROLLER_H
#define MAINCONTROLLER_H

#include <QObject>
#include <QJsonObject>

#include <QFile>
#include <QJsonDocument>
#include <QStandardItemModel>

#include "FileReader/XmlToRecords.h"
#include "DatabaseManager/databasemanager.h"
#include "ConfigEditor/configeditor.h"



class XmlToRecords;
class DatabaseManager;
class MainController :public QObject
{
    Q_OBJECT
public:
    MainController();
    ~MainController();
    Q_INVOKABLE void loadConfig(QString filename);
    Q_INVOKABLE void readRecord(QString filename);

    void set_root_config_json(QJsonObject obj);


signals:
    Q_INVOKABLE void signalDebuging(QString);
private:
    XmlToRecords* xml_parser_;
    DatabaseManager* database_manager_;
    QJsonObject root_config_json_;
};

#endif // MAINCONTROLLER_H
